<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
	<link href="../../skin/jquery.uploadify-v2.1.4/uploadify.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="../../skin/jquery.uploadify-v2.1.4/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="../../skin/jquery.uploadify-v2.1.4/swfobject.js"></script>
	    <script type="text/javascript" src="../../skin/jquery.uploadify-v2.1.4/jquery.uploadify.v2.1.4.js"></script>
	    <script type="text/javascript">
	    	var updateFlag;
	    	function setStatus(){
	    		 $("#uploadify").uploadifySettings("script","../../UpLoad/upLoadFile.do?updateFlag="+$("#updateFlag").attr("value"));
		    }
	        $(document).ready(function() {
	            $("#uploadify").uploadify({
	                'uploader': '../../skin/jquery.uploadify-v2.1.4/uploadify.swf',
	                'script': '../../UpLoad/upLoadFile.do',
	              // 	'script': '../../UpLoad/upLoadFile.do?updateFlag=',//url-pattern
	                'cancelImg': '../../skin/jquery.uploadify-v2.1.4/cancel.png',
	                'folder' : 'uploads',//您想将文件保存到的路径
					'queueID': 'fileQueue',
					'fileDesc' : '图片', 
					'fileExt' : '*.jpg;*.bmp;*.gif;*.png', 
					'height':'26',
					'width':'78',
					'auto' : false,//是否自动提交
					'multi' : true,
					'buttonImg' :'../../skin/image/selectfile.jpg',
					'buttonText' : '',//按钮名称
					'sizeLimit': 4096000,//设置单个文件大小限制，单位为byte  
					 'onComplete': function (evt, queueID, fileObj, response, data) {
							$('<li></li>').appendTo('.files').html(response);
					},
					'onError': function(event, ID, fileObj, errorObj) {
            			alert(errorObj.type + ' Error: ' + errorObj.info);//弹出上传错误信息
        			}
	            });
	        });
	        
	    </script>
	   	<style type="text/css">
	   		button{
	   			width:96px;
	   			height:24px;
	   			border:0;
	   			background-repeat:no-repeat;
	   		}
   	 		li{
   	 			font-size: 14px;
   	 			color:#333;
   	 			font-family: "宋体";
   	 			margin: 5px;
   	 			line-height: 17px;
   	 		}
	   	</style>
</head>
<body>
	<table align="center">
			<tr>
				<td height="20px">
					&nbsp;
				</td>
			</tr>
		</table>
		
		<div  align="center" height="100%">
			<div >
				<table width="60%" >
					<tr width="500px">
						<td>
							<table width="300px" align="center">
								<tr>
									<td>
										<select id="updateFlag" style="height:22px;">
											<option value="1001"><font font-size="15px">家居室内装饰</font></option>
											<option value="1002"><font font-size="15px">办公室案例</font></option>
											<option value="1003"><font font-size="15px">酒店宾馆案例</font></option>
											<option value="1004"><font font-size="15px">货柜展柜案例</font></option>
											<option value="1005"><font font-size="15px">案例展示</font></option>
										</select>
									</td>
									<td style="*padding-top:5px !important;*padding-top:5px">
	   	 								<input type="file" name="uploadify" id="uploadify"></input>
									</td>	
									<td>
										<button onClick="javascript:setStatus();$('#uploadify').uploadifyUpload();" style="background-image:url(../../skin/image/shangchuanfile.jpg);cursor: pointer"></button>
									</td>
									<td>
										<button onClick="javascript:$('#uploadify').uploadifyClearQueue();" style="background-image:url(../../skin/image/cancelfile.jpg);cursor: pointer"></button>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td colspan="3" align="center">
							<div id="fileQueue" style="border-color: red"></div>
						</td>
					</tr>
					<tr>
						<td colspan="3" align="center">			
							<ol class=files></ol>
						</td>
					</tr>
				</table>
			</div>
		</div>
</body>
</html>